﻿
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace NewsMine.Utilities.Tests
{


    /// <summary>
    ///This is a test class for TempAnalyzerTest and is intended
    ///to contain all TempAnalyzerTest Unit Tests
    ///</summary>
    [TestClass()]
    public class TempAnalyzerTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for RemoveAllSpecialCharacterForIndexing
        ///</summary>
        [TestMethod()]
        public void RemoveAllSpecialCharacterForIndexingTest()
        {
            string inputString = string.Empty; // TODO: Initialize to an appropriate value
            string actual;

            inputString = "Riya Sen, Swastika and Paoli in Mainak Bhaumik's next";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);

            inputString = "Moody`s India sovereign rating of Baa3 incorporates macro-economic challenges of weaker growth, a fall in the rupee and the twin deficits.";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);

            inputString = "Assailants fired four rounds, two bullets hit the back of Narendra Dabholkar's head causing death on the spot: Police - 3 hours ago";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);

            inputString = "UK had newspaper disks destroyed: Guardian chiefBritish agents oversaw the destruction of an unspecified number of the Guardian newspaper's hard...";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);


            inputString = "இந்தியாவின் தங்க நுகர்வு 310 டன்களை எட்டியது!!";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);

            inputString = "మంచు విష్ణు 'దూసుకెళ్తా'... ముద్దొస్తున్న లావణ్య!";
            actual = TempAnalyzer.RemoveAllSpecialCharacterForIndexing(inputString);

        }

        [TestMethod()]
        public void RemoveNumbersFromStringTest()
        {
            string inputString = string.Empty;
            string actual;

            inputString = "Riya Sen, Swastika and Paoli in 1280 Mainak1 Bhaumik's next";
            actual = TempAnalyzer.RemoveNumbersFromString(inputString);


        }


        [TestMethod()]
        public void RemoveSingleCharacterWordsFromStringTest()
        {
            string inputString = string.Empty;
            string actual;

            inputString = "whay a iekdk d 239 ddjyr sk a bacn s s's skdue s;s s8s ";
            actual = TempAnalyzer.RemoveSingleCharacterWordsFromString(inputString);


        }

        

            
        [TestMethod()]
        public void RemoveLengthyWordsFromStringTest()
        {
            string inputString = string.Empty;
            string actual;

            inputString = "whay a iekdk d 239 ddjyr sk a bacn s s's skdue s;s s8safadfasfwerqweasfawerasdfasdfweqrasfsdfasrewfsdfsdfawefasfaefwvcafsfweqfafe asdadfa adsfasdfasfdas ";
            actual = TempAnalyzer.RemoveLengthyWordsFromString(inputString);


        }

        

               [TestMethod()]
        public void RemoveStopWordsFromStringTest()
        {
            string inputString = string.Empty;
            string actual;

            inputString = "aspx whay http com html use a the iekdk d 239 ddjyr sk a bacn s s's skdue s;s s8safadfasfwerqweasfawerasdfasdfweqrasfsdfasrewfsdfsdfawefasfaefwvcafsfweqfafe asdadfa adsfasdfasfdas ";
            actual = TempAnalyzer.RemoveStopWordsFromString(inputString);


        }

    }
}
